First draft of compute function in test case