added print functionality