added changed code to ffg