
function createPoolADD(uint256 inputBase, uint256 inputToken, address token) external payable returns(address pool){
...
    address _token = token;
    if(token == address(0)){_token = WBNB;} // Handle BNB -> WBNB
        ...
    _handleTransferIn(token, inputToken, pool); // Transfer TOKEN liquidity to new pool

function _handleTransferIn(address _token, uint256 _amount, address _pool) internal returns(uint256 actual){
    if(_amount > 0) {
        uint startBal = iBEP20(_token).balanceOf(_pool);
        iBEP20(_token).transferFrom(msg.sender, _pool, _amount);
        actual = iBEP20(_token).balanceOf(_pool) - (startBal);
    }
}

function _handleTransferIn(address _token, uint256 _amount, address _pool) internal returns(uint256 actual){
    if(_amount > 0) {
        if(_token == address(0)){
            require((_amount == msg.value));
            (bool success, ) = payable(WBNB).call{value: _amount}(""); // Wrap BNB
            require(success, "!send");
            iBEP20(WBNB).transfer(_pool, _amount); // Transfer WBNB from ROUTER to pool
            actual = _amount;
        } else {
            uint startBal = iBEP20(_token).balanceOf(_pool); // Get prior TOKEN balance of pool
            iBEP20(_token).transferFrom(msg.sender, _pool, _amount); // Transfer TOKEN to pool
            actual = iBEP20(_token).balanceOf(_pool)-(startBal); // Get received TOKEN amount
        }
    }
}
