added validations, maybe something else I'm forgetting to note