finishing the data insert and fixing a bug from eknight arrival