Major Changes to 118

I noticed a few problems in my function and did a lot of changes to make
it work