moved stuff to templates