Start to make max work with multiple types