connectAssSlave code