updated function execute-c