added loader and d3 functionality