made alot of fixes and changes