Added contribution calculation to compute.py