Changed style of encode definition