add rtime unit tests.
add comments.