changed method of processing and displaying date