added written times and fixed stuff