cargo loader refactor + additional functionality