Replacing hardcoded next