                 self.removeHistoryItems(toRemove)
 
                 // load items to view
-                if let historyItems = self.getHistoryItems() {
+                if let historyItems = self.getHistoryItems(filters) {
                     success(response: historyItems)
                 } else {
                     failure(error: NSError(domain: "didnt get history items", code: -12351223, userInfo: nil)) // TODO: call error callback if there were realm problems

    }
    
    ///
    private func getHistoryItems() -> [HistoryItem]? {
        if let realm = try? Realm() {
            let query = realm.objects(StoredHistoryItem.self).sorted("timestamp", ascending: false)
            
            return query.flatMap({ storedItem in
                logger.debug("\(storedItem.model)")

            ControlServer.sharedControlServer.getMeasurementHistory({ historyItems in
                self.insertOrUpdateHistoryItems(historyItems)

                if let dbHistoryItems = self.getHistoryItems(filters) {
                    success(response: dbHistoryItems)
                } else {
                    success(response: historyItems)
                }
                
            }, error: failure)
        }
    }

    ///
