more accurate way for last commit