refactor latest_commits