some of Rick's stuff; using joins for stuff