refactor to be more REST like