replaced bool with int
for local network