fixed refactor errors + comments from reviewers