fix microtime issue
add tests