cleaned up harts stack allocation