Adding inputstream names to query