minor corrections and adding some value functions