my modification of code