made some changes, still having some errors