added refresh usage. This is not practical since it has to perform all data. Shifting is practical, but needs better algorithm