getting rid of cout calls