neaten template
cache properly