a few fixes and the cache sim is almost complete