updated struct transfer code