Added a update() method to refresh data