checking correct status code for created