Adds implementation of print method.