remade queries for new api