added grabbing cursor state