Adjust the window; add helper func in funcs.py