added loader
removed unused code