issue #3 -- most introspective functions are in place together with unit tests