corrected legacy table name in query