refacting done
add interface leaving encoding error