Adding the refresh function & introducing exceptions