refactored the process execution