updated mapping code and webservice for stats