refactor response type