adds input collection, does some clean up