changed most of the preexisting printfs to console printf