manually manage external state