Add update to refresh function