update code to fix small details