Refactored and better