Refactor + improved