refresh function added