Added Sync version of encoded method