separate process logic