redefined response status code
refactor code for response code