iteration 9: changes file structure, adds ranking and sorting // begin extensions