ported the as3 history class