Refacored and tested choice making.