New version with database and FoF working