add get-pool macro to state package
use state object instead of separate variables