Refactored elwise