cleaned up xmp_create