Method for making contact lenses