pulling in from the original cocos2d project