Copied files from the previous project! too separate the io from the visualization