Changed printfs to couts