added capture for reference