simplified timing code