added validation, hooray!