Horrible code source but working. I guess...