used each method to print