update method implemented in class Storage