added tests, worked on heap