Use template function
Also test minComponent