implemented form data set construction algorithm