fixed main to return int instead of void