inplement print functionality