Updated the update function and also changed the README file