added a method to print the time. closes #2