use constructor with metadata as 2nd last param