added address, tests, refactor