join_proj.php added, minor tweaks to algorithm