Mode function

get the mode of a dataset