use httpstatuses to handle status codes