solved the time bug