added validation for status and roles