Added a new function to beating.