fixed ordering of variables