removed duplicated function