refactored to just be transport layer library