sending lists to template and formatted properly