added unit tests for loader