added the filter function the all controllers and modified the error messages