code was fixed according recommendation