added global and local val