added maximum
added minimum