implemented live queries