arrange code structure