HOUSTON -

A 5-year-old boy who was forced to live in his father's closet will go to live with his great aunt. His mother will have access to him, a judge ruled Tuesday.

CPS will oversee everything.

Officials say the boy who was nearly starved to death allegedly at the hands of his family is now healthy enough to leave the hospital.

Jordan Bleimeyer was severely malnourished when he was found weighing just 29 pounds at the end of March.

Jordan's mother, Windy Hall, fought for custody but issues, including her marijuana use, were brought up in court.

"I'm happy with the outcome," Hall said. "This is something that is only temporary."

The judge's ruling is for the next 45 days. On May 19 they will meet again for another hearing to discuss how the arrangement has been working.

"She has 24 hour access to the child when the child gets released from the hospital, which we think is in two days," Frank Mann, Hall's attorney said.

Hall told the court on Tuesday she'd like to take Jordan home to live as a family with her and her fiancé, Derek Aune, but some expert witnesses argued that wasn't in Jordan's best interest. 

A hospital staff member testified that Aune threatened to take Jordan's food away when the boy refused to take his medicine and that he got upset with Jordan when he had an accident in his pants.

One witness said drug tests show Aune is a chronic, every day pot smoker. Hall has also tested positive for chronic use of marijuana.

"If they cannot come back with clear drug tests they are out of the picture," said Jared Woodfill, the court appointed attorney who represents Jordan. "If the pot doesn't stop it's over for them. This kid cannot be traumatized anymore than he's already been traumatized. When you have parents that potentially come home high - that's not in the child's best interest."

For now Hall and Jordan will live with Hall's aunt. CPS is requiring Hall and her fiancé to undergo random drug testing and attend parenting classes. Hall will also have to have a psychiatric evaluation. 

Jordan's father, Bradley Bleimeyer, is accused of child endangerment and was in court Tuesday but didn't say anything after pleading the Fifth.

A Facebook page dedicated to helping Jordan released an update Monday saying he has gained four pounds, bringing his weight to 33 pounds. The page is called "Toy Drive for Baby Boy Bleimeyer."

Authorities say Jordan couldn't be released from the hospital until that custody hearing was held.

Local 2 has teamed up with Be a Resource for CPS Kids or the BEAR program to help Jordan, and other abused children. There are drop-off sites all over the area. Click here to find out how you can help.