first version, prints the top 5 lines of data
made changes to write parameters