add callback for arr