Added the update function

Added the update function and updated readme file