finished the first draft of the code: finished the backend.load function and freeing memory