refactored 12