refactor financial report code