Setting up the Process Function