added button to reset algorithm