added comments for the majority formula