more efficient alternative to last commit