removed iostream and dead code