replaced table specific print methods with  a general method