fixed some errors, and improved some things