code clean up, timer, test
code style