Adds first / next functions