updating template ordering, putting extends on top