adding input parsing to controller