added 'pick' function