almost done with loaddata functionality

Working flawlessly except for some error preventions