add in refresh function