updating docs and putting debug checks for output