polarwl improvement based on feedback from David