adding sigma calculation