added js alerts