updated to fix some errors but more to come