added support for multiple staves