add basic functions and tests.