refactored some function to better reflect the several selections and their different implementation