reordering + cleanup