Changing custom serialization for serpent library