design a function that returns the minimum element