code before parallel