calculate the return