Oh my ... this is not pretty, but it is useful ...