update and bug fixes