changed python exec method