added min, max
added tests