added copy of lab code (take_from_struct etc)