modified UIhandler.js for cleaner data