fixed some errors, but there are more