Refactored w5e4