Added refresh function