added several functions to discrete functions class