A judge said the 23-year-old 'risked a fatality'