Divide function is added to the main code