Modified some methods and created method update_data()