[FridayPuzzle] added functional code