abstraction
also, frame time calculation wasn't quite exact