some refactor for reporting and fix account filter