Hopefully working version of joins.