Started on the mode function