changed echos to print r