added offset to as_compare