further refactored rsem main.sh