refactor and add selectFromText parser