working version with type uuid defined