added additional input check to 7