fixed main script
fixed script