added/worked on functions in stdfun.h