refactor stave rendering method