refactored with Jack advices