what I can do to improve it
You could improve the code a lot if you read up on "for" loops and the use of arrays.
Pete