Encoding of output with 0.1 and 0.9 by bgreeven suggestion