refactored numbers, added tests