added choose function