initial completion of partition selection code