added replenish functionality