Use template to construct