Thank you all. My program is working now. It was easier to split into a vector (array).