added dt to processFrame