added zone array and modulated some functions