new version trying to abstract out parts of transmission algorithm, for user control