Added refresh function.