Added back query button for testing

code runs correctly currently