Modified to accept only numbers