cleaned up rest api methods