Added state to template #271