refactored RESP impl into separate package