A court commissioner in Los Angeles granted Britney Spears three monitored visits a week with her two small sons while ordering the pop star to childproof her house and work out a schedule for the visits with her ex-husband Kevin Federline, according to a ruling made Tuesday.

Superior Court Commissioner Scott Gordon also required that Spears undergo random weekly drug and alcohol tests.

Spears, 25, also must continue meeting with a court-appointed parenting coach, and the youngsters must be in car seats when they are being driven, the ruling states.