refactored 12 a little bit