added right calculation for activities