made fill-template use a reduce
made is-optional use a some and a macro