main code done