change window create function