placed encoder and decoder refrence correct in the factory cpp files and split decoder