Change capture to proc