wrapping categories in containing elements