created discrete functions

stable