remove trailing space
use Metadata type