Wrote a class to simulate block memory