Courts discretion in dealing with mentally ill