rewrote the conversion function, valueOf(warning.toString()) will never do the work ;)