method for formatting