add offset method and tests