Added a function for commit activity. Part of issue #3