Add refresh function.