added code for user defined names
Fixed infinite loop on, and added first letter check to add to array