add offset and max-with to index template