add set next val function