improve with destructuring