Added a check to make sure inputs are > 1