added loader functionality