mini refactoring: use destructuring instead of explicit let binding
improved documentation