refactored WebApi