Input check added