refined code

refined code on index page