checked main def