added js condition