renamed BEAT_LENGTH to BEAT_LENGTH_SIZE
merged abduls code