Window class working