refactor credit log to simplify model