changed min to max, oopsie