status.js: functions extracted