Made it work

It's ugly, but it works.