added multi input support in decoder