some refactoring of file structure