added proper callback function to tecaj.js which returns the result as an object