some quick changes; does not yet completely work