added fine grained coding scheme