implemented update function
Removed unused function