added to hal.js