wokrked version wiht print report to console