reduced query complexity by reducing joins

fixes #13