add window support
add state