big update and bug fixes