was using memset incorrectly for int arrays