Main process