fixed minor error in data loading code, also fixed LCL function so now its correct