file now prints to the screen
refactored a bit. resizing works