remove illigal calls from main