Lastly, why are you reassigning one variable multiple times? Can you not just use strMaxent instead of wasting the memory (although it is minuscule) by creating another variable with the same information.