refactoring embedded