Use template to assure correct shape