change var name from count to offset