added top level investigation, improved on api and tests