refactored the PlateDecoder