value functions fixes