some changes - in function closeEverything