fixed boolmain and finished natmain