fix function 'do'