optimized method

Response and view error.