Next step would be free space and fclose and etc. I also need to comment on the code and write a readme file