task 3 lab 2

changed min() to Math.min()