A California judge has prosecutors scratching their heads after she allowed what they say is a dangerous criminal to remain free before trial as long as he reads at least an hour a day and writes book reports.

Otis Mobley Jr., 23, and two friends allegedly tried to sell a grenade launcher to an undercover federal agent in March. When the agent showed up to complete the purchase, the three men held him at gunpoint and tried to rob him, at which point other agents swooped in.

Prosecutors say Mobley’s criminal past and substance abuse make him a flight risk and a danger to the community, and they’d asked US District Judge Yvonne Gonzalez Rogers to deny bail and keep him locked up pending trial.

However, she upheld a ruling of a lower judge and ordered Mobley to be released to the custody of his grandmother on a $150,000 bond. She also ordered him to wear an ankle monitor with GPS tracking, and to read an hour a day and spend at least 30 minutes daily writing book reports.

But he can’t just read whatever he wants — Rogers says she’ll provide a reading list for Mobley as he awaits trial.