added replace separator function