method for getting median mean etc.