Extract that into a method