make composite method templated and fix visibility issue
(reverts  1ff4125e92b0a022a364ea9129ced8d7500a8ad1)