added tests and corrected the number function