add test for choose function