added kmathern changes