Extract helper method