Stats js code