small edits

fixed syntax error, changed off by 1 error, fixed printing