add print method for dp table