add input verification