added discrete 1 or 0 function
added sum functions and made changes in decider