started addeing mgas calculation