added validation to models
fixed stuff