refactoring to create n transport layers