cleaned up the device_dao.js