validate input, kindof