Everything except inserting println complete
some small fixups in main
adding older version of the file