updated and bug fixes