add minimum and maximum..not sure if its right though