added trim_struct function to conf to trim buf to the wanted data --> finished!?