added -d option for separator specification