Min Max Logic implemented

Signed-off-by: Thomas Schubert <funthomas424242@gmail.com>