change how datetime of tx are stored and sort them in datamodel