started implementing simpleencode