changed to time and logging