helpers und calculations rewritten for structures