adds join command; important bugfixes