refactor forwarding logic