to add keystate and asyncstate test