some testing and bug fixes