add flag to toggle using structs or strings for pipes