fixing misplaced delegate. also set other needed delegate