Move logic out of class helper method