gradient shooting up rectified, removed unncessary arguments from majority algo