If you wrote the code you say you did, you should be able to change it yourself. Regardless, nobody here will write your code for you. That's not what we do. We will help you, but we expect you to do the work yourself.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors