added loader functionality2