https://blog.aswind7.com/posts/use-singleton-create-window/