started to do menus plus small bugfix for quries