updates and bug fixes