peers refactor