added offset option as argument