refactored response api