adds connection function... which is broken