time and fix bugs