fixed choose function