added majority rule function
fixed syntax error
added calling program
updated aggregation logic