fixed bugs, added connections