var mediacontroller = new mediacontroller(); mediacontroller.onpreadmission((eventargs) => { var sentimentanalysis = new sentimentanalysis(); if (!sentimentanalysis.disparage(eventargs.message)) { var furtivecontent = mediacontroller.getfurtivecontent(); var positiveformula = sentimentanalysis.applypositiveformula(furtivecontent); mediacontroller.displaymessage("no need to start over, embrace the journey with a positive outlook!"); }});