cleaned code and reduced 2-stage selection to a single stage \n
NOTE: tox failure - needs fixing