added outline of decide function.