adding tests and code