moved is_integer method