refactored 43-51