try setImmediate with buffer as array