added sleep call after write_int in setup protocol