add timing module and debug mode