removed minFunc