Added validation for required value
Modified algorithm controller