Use destructuring instead of normal function