adds validation for address and id