added tools class
added function to convert haspMaps to json
the javascript function where are passed on different threads