small changes, cleaning, enc field
fix rounding bug in position