implemented to_number