That was ugly. Refactoring was needed