rearranged and commented out auto functions