removed next function