multiple tables filtering and sorting harriness