fixed timing off by one