still work on heap and stacks, solution for simplify path