re-organizer code structure