added loader code