queries a c and d