use destructuring to clean up the code a bit