some changes according to commets