add factory Dist function
fix bug that prevents the 2nd keypress after reset from working