refactoring and completed shra