lots of changes, starting towards join impl