added source code for decision engine