template reduce path dependence
remove unused func
fix