lib template enhancements