Removing duplicated function since I moved it to the class.