added gframe to count game frame