fixed main prototype