err handling, send suffix/prefix, refactoring