Added unit tests for compute functions