added encoding to pipeline