Added destructuring to simplify code