add the refresh function on dependency