initial lbapi query; syntax fixes