changed API for loading files; performance tests added