checking value of tmp array