adding categorical structure