added more to decode but its ugly