refactored part 2 - more restful