added contract analysis and reconfigured the flags