implemented update and tested