addded js functions