now using delta time instead of absolute time, changed some comments