while at it add two helper functions to add and remove windows from list and reuse it in MakeWindow for creating windows