renamed level_num to severity; fixed level function to not recursively call itself into infinity (whoops)