tweaked image timing code