refactoring letters order controller, writing tests