tests and code functional