some input checks