refactor logic helper to not use instance variables