adapting the code to Fepic changes