script for dividing dataset & results of optimization