refact and add new feature : files