begin refactoring of replies controller