changed transfer for better error support and added a test script (that doesnt quite work yet)