added sql-join hook