update function is ready for testing