removed unwanted code in getcollection API