refactor add 501 response