First attempt at minmax in the ui