tidy up communication test
seperate out helper functions