fixed mailman algorithm