add more automated and safe query evaluation