modularize the Pick activity code