encoder is mostly working now.