sync with EV fork: improved efficiency, added timing