almost done w/ implementation
Optimizations and global checking not implemented. Algorithm doesn't work at the moment, too many bugs. But does come up with output.