Added a method update. have not finished yet.