added example how to get minimum and maximum