refactioring some file