Refactor invoke logic to own method