adding loader and a few enhancements