extract process logic