update submenunav to use function