added ability to specify status codes