Updates to refresh function