updated keystate test