prettify template and wip sorted dict