updated decode & format