Next element function + test