refactered some code added a flego folder