test refresh function