add new debug func and test timer