cleared out array with for and fixed null char