Implement the div function