cleanup from main