modifyInput now returns a List<Object>