add basic unit test and basic compute function