adding Input check