adding functions min and max