added measure bitmap and machine state - a few improvemants added