fixed update tests and code