code reorder and rename