adding code for checking majority element