fixed the bash duplicates issue - added rstrip