new main code