finished most of the template