Added temp test encoding/decoding functions