made changes based on mathieus recommendation to check the delimiter