Completed min of two value

probably a way better way to do this