logic for string picking is working