adding number length check and updating tests