Determining the mode