change vector hwnd to int
organize code; add more functions