added divide function code