fixed a bug in encoding; still more to fix..
removed the alternative method for forwarding

don't like redundant code. I may re-examine the method in future in case it is actually faster on larger data sets.