correct a duplicated function