main.R finished