adding printing functionality