Sometimes, code doesn’t do what it is supposed to, or what you expect. This is particularly common with open source code you didn’t write.
You can’t change the basic code architecture or data structures.
Take the time to look for examples in the code, so you don’t have to figure it all out from scratch. Usually, modifications to open source code involve code similar to that which is already in there, for example reassigning values.