basic implementation of multijoin complete