more improvements on the loader
add tests and test data