working on realtime decoder