removed iostream dependency