fixed m, and why to set window titles, now a function