tests and function changes