updated routing to use the input object