unified printing function

fixed some typos with print functions