refactoring how tail call arguments are handled