Added 4 encoder support