added minAzero code