replaced 'print' & '\n' with 'puts'