adding initial version of the perpetual decoder