Got simpleencode working and outputting the values I expect