modified is_number block