add window procedure