declare `var pool` at the top.