add a structure and basic operations