Update flaresFunctions.cpp