main code base