making Widget templates more flexible