added timing and new subprocess handling