fixed closest mouse query; set up relational data