added loader javascript