utils and basic data structures