builds with templates