update code - remove unnecessary code