Update execute.cc

Implemented checkCondition