offset, refresh function