working on reentrancy