added metadata creation in alignment step