Added possibility to execute lookup queries.