workign with master, slave