applying formating methods to print result