added loader code - still very hacky, patch coming soon