What do you think about extracting this into a helper method?