refactored to make use of pretzel operator