minFunc() function handler