Implemented Max Weight Queries