remove unwanted code from main