added check for num greater than 100 and less than 1