first working iteration
minimizing and recovering heading, removing windows