more refactor on report