divide function from class.