Added refresh code