replace redundant wm detection with arguments