changed main script to avoid file conflicts