added query in C and added TreeParams msg