update, add some tests.