Removing duplicated function