Converted addMenu to use the new query function