added conversion from text to objects into controller