implement relational join