add currency refresh function in a controller