sa added to bwt some comments changed
merging from Edmund's code review