correcting beats value when sync-beat
updating tests
updated function doc