better window switch functionality