rearranged code in files