basic loader functionality (still bugs)