questions.js-> alternate badge criteria added, open code organized in
seperate function defination and call