adding a print function