Updated learning & querying