closed #2 Implemented update and clear methods