cleanup; moved all processing into one button