refactored service to use QueryParam