tweaked with templates