reordering defns, to make things compile