change code according to code reviews