set the max key value as an option