setting up process events and tests