implementing destructuring
done: implementing destructuring