handling the by argument in join functions. closes #67