updating main code