added js for selection