refactor according to cr