min and max function for matrix
inserted colors
changed wording