some errors corrected, still compliation issues