some improvment, use local images
proper js code