[field descriptor] raise exception when passed unwanted value
refactor encoding message
refactor decode function