added some frame code from the game stub library