fixed main and added script