simplification of data transfer functions, synchronisation and debug messages not yet working