added validation to assignment model