add checkMaxAndMin method and first test