reordering stuff for clarity