Fixed encoding, now working prototype