add MIN & MAX to utils.h
separate prototype and generate