cleaned up code in remove big numbers function