euler refactoring/update