added beat matching