added offset options to some state functions
examples and test of using offset argument with states