some extra input validating