trying with faster array reset code (see http://stackoverflow.com/q/1232040)