Added auto incrament, still working on ecn functionality